#include <stdio.h>

int main() {
    int a = 0;
    while (scanf("%d", &a) != EOF)
    {
        if (a % 5 == 0)
        {
            printf("YES\n");
        }
        if (a % 5 != 0)
        {
            printf("NO\n");
        }
    }
    return 0;
}